import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TrackingController } from './tracking.controller';
import { TrackingService } from './tracking.service';
import { TrackingLoggerService } from './tracking-logger.service';
import { WebsiteService } from './website.service';
import { StatsService } from './stats.service';
import { IpService } from './ip.service';
import { SessionService } from './session.service';
import { LogService } from './log.service';
import { Website } from './entities/website.entity';
import { PageView } from './entities/page-view.entity';
import { Event } from './entities/event.entity';
import { Session } from './entities/session.entity';
import { TokenModule } from '../token/token.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Website,
      PageView,
      Event, // 添加Event实体
      Session, // 添加Session实体
    ]),
    TokenModule
  ],
  controllers: [TrackingController],
  providers: [
    TrackingService,
    TrackingLoggerService,
    WebsiteService,
    StatsService,
    IpService,
    SessionService,
    LogService,
  ],
  exports: [
    TrackingService,
    TrackingLoggerService,
    WebsiteService,
    StatsService,
    IpService,
    SessionService,
    LogService
  ],
})
export class TrackingModule {} 